package com.wcl.nullmusic;

import android.graphics.Bitmap;
import android.os.Parcel;
import android.os.Parcelable;


/**
 * Created by dllo on 16/1/6.
 */
public class Mp3Info implements Parcelable{
    private String url;
    private String title;
    private String artist;
    private int duration;
    private String pic;


    public Mp3Info() {
    }

    public Mp3Info(String url, String title, String artist, int duration, String pic) {
        this.url = url;
        this.title = title;
        this.artist = artist;
        this.duration = duration;
        this.pic = pic;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getArtist() {
        return artist;
    }

    public void setArtist(String artist) {
        this.artist = artist;
    }

    public int getDuration() {
        return duration;
    }

    public void setDuration(int duration) {
        this.duration = duration;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Override
    public String toString() {
        return "Mp3Info{" +
                "title='" + title + '\'' +
                ", artist='" + artist + '\'' +
                ", duration=" + duration +
                ", pic=" + pic +
                '}';
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(url);
        dest.writeString(title);
        dest.writeString(artist);
        dest.writeInt(duration);
        dest.writeString(pic);
    }
    public static final Parcelable.Creator<Mp3Info> CREATOR=new Creator<Mp3Info>() {
        @Override
        public Mp3Info createFromParcel(Parcel source) {
            return new Mp3Info(source);
        }

        @Override
        public Mp3Info[] newArray(int size) {
            return new Mp3Info[size];
        }
    };
    public Mp3Info(Parcel source){
        url=source.readString();
        title=source.readString();
        artist=source.readString();
        duration=source.readInt();
        pic=source.readString();
    }
}